﻿@{
    ViewBag.Title = "List";
    Layout = "~/Views/Shared/_JuiLayout.cshtml";

    string hostId = MyRequest.GetQueryString("hostId");
    string userName = selectControlBLL.getNameById("id", hostId, "Sys_IBUsers", "RealName");

    string addurl = "/SysMenu/Add?menu=SysIBUserFunctions&name=AddNode&hostId="+hostId;
    string editurl = "/SysMenu/Edit/{id}?menu=SysIBUserFunctions&name=EditFun&tname=" + DencryptHelper.Encrypt("Sys_IBUserFunctions");

    string tname = "Sys_IBUserFunctions";
    string url = "/SysMenu/SysIBUserFunctions/List";
}

@section header {}
<div id="layout" class="noNavTab">
    <div id="navTab">
        <h2 class="contentTitle">
            用户功能权限管理</h2>
        <div class="pageHeader">
            <div class="searchBar">
                <table class="searchContent">
                    <tbody>
                        <tr>
                            <th>
                                用户：
                            </th>
                            <td id="name">
                                <label>@userName</label>
                            </td>
                            <th>
                                状态：
                            </th>
                            <td>
                                @{Html.RenderPartial("~/Views/Shared/ForStates.cshtml");}
                            </td>
                        </tr>
                    </tbody>
                </table>
                <div class="subBar">
                    <ul>
                        <li>
                            <div class="buttonActive">
                                <div class="buttonContent">
                                    <button onclick="loadList(0)">
                                        查询</button>
                                </div>
                            </div>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
        <div class="pageContent">
            <div class="panelBar">
                <ul class="toolBar">
                    <li><a class="add" href='@addurl' id="addnode"><span>添加</span></a> </li>
                    <li><a class="edit" href='@editurl' target="editblank" rel="ids">
                        <span>修改</span></a> </li>
                    <li>@Html.Raw(JUIResult.ReturnOpen(tname, url, "1"))</li>
                    <li>@Html.Raw(JUIResult.ReturnDel(tname, url, "1"))</li>
                    <li class="line">line</li>
                </ul>
            </div>
            <div id="listDt" class="pageContent">
            </div>
        </div>
    </div>
</div>

<link href="../../content/jui-normal.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/Scripts/pager.js"></script>
<script language="javascript" type="text/javascript">
    $(function () {

        var control = "SysMenu", node1 = "SysIBUserFunctions", node2 = "List", tname = '@DencryptHelper.Encrypt("Sys_IBUserFunctions")';
        

        loadList(0);
    });
    function loadList(i) {
        var htmlname = "listDt";
        var pars = '@MyRequest.GetQueryString("hostId")';
        pars = encodeURI(pars);
        var name = "0_UserId__0";
        var tName = '@DencryptHelper.Encrypt("Sys_IBUserFunctions")';
        var control = "SysMenu/SysIBUserFunctions/ListControl";
        var datebase = "1";
        var states = $('#states').val();
        list(htmlname, pars, name, tName, control, datebase, states);
    }
</script>
